import axios from 'axios'

const service = axios.create({
	baseURL: 'http://localhost:3000'
})

service.interceptors.request.use(config => {
	return config
})

service.interceptors.response.use(
	res => {
		const { status, data } = res
		if (status === 200) {
			return data
		}
	},
	err => {
		console.log(err)
	}
)

export default service
